package com.salt.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.salt.entity.IdleAffiliateCpaIncomeDetail;

import java.util.Date;
import java.util.Map;

/**
 * 闲鱼联盟CPA佣金明细服务接口
 */
public interface IdleAffiliateCpaIncomeDetailService extends IService<IdleAffiliateCpaIncomeDetail> {
    
    /**
     * 分页查询佣金明细
     */
    Page<IdleAffiliateCpaIncomeDetail> pageQuery(Page<IdleAffiliateCpaIncomeDetail> page, Date startDate, Date endDate, Integer state, String keyword, String inviteCode);
    
    /**
     * 获取佣金明细汇总数据
     * @param startDate 开始日期
     * @param endDate 结束日期
     * @param inviteCode
     * @return 汇总数据，包含：
     *         - u2UserCount: U2用户数量
     *         - newUserCount: 推荐新用户数量
     *         - newFriendCount: 推荐新朋友购买数量
     *         - totalAmount: 总金额
     */
    Map<String, Object> getIncomeSummary(Date startDate, Date endDate, String inviteCode);
} 